<?php
use think\facade\Route;

/* 个人中心 */
Route::group('profile', function () {
    Route::get('$', '@index');
})->prefix('\app\user\service\user\Profile')->middleware(['withoutLogin']);

/* 关注及粉丝 */
Route::group('follow', function () {
    Route::get('$',         '@getFollowList')->middleware(['withoutLogin']);  // 关注列表
    Route::post('$',        '@follow');         // 关注
    Route::delete('$',      '@unfollow');       // 取消关注
    Route::get('follower$', '@getFollower')->middleware(['withoutLogin']);    // 粉丝列表
})->prefix('\app\user\service\user\Follow');

/* 访客 */
Route::group('visitor', function () {
    Route::get('recent$',   '@recentVisitors');  // 最近访客
})->prefix('\app\user\service\user\Visitor')->middleware(['withoutLogin']);

/* 签到 */
Route::group('punchIn', function() {
	Route::post('$', '@punchIn');
})->prefix('\app\user\service\user\Profile');

/* 三方登录 */
Route::group('thirdlogin', function() {
	// 绑定
	Route::get('bind$', 	'@thirdloginBindStatus');
	Route::post('bind$', 	'@thirdloginBind')->middleware(['withoutLogin']);
	Route::delete('bind$', 	'@thirdloginBindDelete');

})->prefix('\app\user\service\user\Profile');
